home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xlibint.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  20KB  |  736 lines

  1. /* $XConsortium: Xlibint.h,v 11.91 91/07/22 15:43:08 rws Exp $ */
  2. /* Copyright 1984, 1985, 1987, 1989  Massachusetts Institute of Technology */
  3.  
  4. /*
  5. Permission to use, copy, modify, distribute, and sell this software and its
  6. documentation for any purpose is hereby granted without fee, provided that
  7. the above copyright notice appear in all copies and that both that
  8. copyright notice and this permission notice appear in supporting
  9. documentation, and that the name of M.I.T. not be used in advertising or
  10. publicity pertaining to distribution of the software without specific,
  11. written prior permission.  M.I.T. makes no representations about the
  12. suitability of this software for any purpose.  It is provided "as is"
  13. without express or implied warranty.
  14. */
  15.  
  16. /*
  17.  *    XlibInternal.h - Header definition and support file for the internal
  18.  *    support routines (XlibInternal) used by the C subroutine interface
  19.  *    library (Xlib) to the X Window System.
  20.  *
  21.  *    Warning, there be dragons here....
  22.  */
  23.  
  24. #ifndef NEED_EVENTS
  25. #define _XEVENT_
  26. #endif
  27.  
  28. #include <X11/Xlib.h>
  29.  
  30. /*
  31.  * define the following if you want the Data macro to be a procedure instead
  32.  */
  33. #ifdef CRAY
  34. #define DataRoutineIsProcedure
  35. #endif /* CRAY */
  36.  
  37. #ifndef _XEVENT_
  38. /*
  39.  * _QEvent datatype for use in input queueing.
  40.  */
  41. typedef struct _XSQEvent {
  42.     struct _XSQEvent *next;
  43.     XEvent event;
  44. } _XQEvent;
  45. #endif
  46.  
  47. #if NeedFunctionPrototypes    /* prototypes require event type definitions */
  48. #define NEED_EVENTS
  49. #endif
  50. #include <X11/Xproto.h>
  51. #include <errno.h>
  52. #define _XBCOPYFUNC _Xbcopy
  53. #include <X11/Xfuncs.h>
  54. #include <X11/Xosdefs.h>
  55.  
  56. /* Utek leaves kernel macros around in include files (bleah) */
  57. #ifdef dirty
  58. #undef dirty
  59. #endif
  60.  
  61. #ifdef CRAY
  62. #define WORD64
  63. #endif
  64.  
  65. #ifndef X_NOT_STDC_ENV
  66. #include <stdlib.h>
  67. #include <string.h>
  68. #else
  69. char *malloc(), *realloc(), *calloc();
  70. void exit();
  71. #ifdef SYSV
  72. #include <string.h>
  73. #else
  74. #include <strings.h>
  75. #endif
  76. #endif
  77. #if defined(macII) && !defined(__STDC__)  /* stdlib.h fails to define these */
  78. char *malloc(), *realloc(), *calloc();
  79. #endif /* macII */
  80.  
  81. /*
  82.  * The following definitions can be used for locking requests in multi-threaded
  83.  * address spaces.
  84.  */
  85. #define LockDisplay(dis)
  86. #define LockMutex(mutex)
  87. #define UnlockMutex(mutex)
  88. #define UnlockDisplay(dis)
  89. #define Xfree(ptr) free((ptr))
  90.  
  91. /*
  92.  * Note that some machines do not return a valid pointer for malloc(0), in
  93.  * which case we provide an alternate under the control of the
  94.  * define MALLOC_0_RETURNS_NULL.  This is necessary because some
  95.  * Xlib code expects malloc(0) to return a valid pointer to storage.
  96.  */
  97. #ifdef MALLOC_0_RETURNS_NULL
  98.  
  99. # define Xmalloc(size) malloc(((size) > 0 ? (size) : 1))
  100. # define Xrealloc(ptr, size) realloc((ptr), ((size) > 0 ? (size) : 1))
  101. # define Xcalloc(nelem, elsize) calloc(((nelem) > 0 ? (nelem) : 1), (elsize))
  102.  
  103. #else
  104.  
  105. # define Xmalloc(size) malloc((size))
  106. # define Xrealloc(ptr, size) realloc((ptr), (size))
  107. # define Xcalloc(nelem, elsize) calloc((nelem), (elsize))
  108.  
  109. #endif
  110.  
  111. #ifndef NULL
  112. #define NULL 0
  113. #endif
  114. #define LOCKED 1
  115. #define UNLOCKED 0
  116.  
  117. extern int errno;            /* Internal system error number. */
  118.  
  119. #ifndef BUFSIZE
  120. #define BUFSIZE 2048            /* X output buffer size. */
  121. #endif
  122. #ifndef PTSPERBATCH
  123. #define PTSPERBATCH 1024        /* point batching */
  124. #endif
  125. #ifndef WLNSPERBATCH
  126. #define WLNSPERBATCH 50            /* wide line batching */
  127. #endif
  128. #ifndef ZLNSPERBATCH
  129. #define ZLNSPERBATCH 1024        /* thin line batching */
  130. #endif
  131. #ifndef WRCTSPERBATCH
  132. #define WRCTSPERBATCH 10        /* wide line rectangle batching */
  133. #endif
  134. #ifndef ZRCTSPERBATCH
  135. #define ZRCTSPERBATCH 256        /* thin line rectangle batching */
  136. #endif
  137. #ifndef FRCTSPERBATCH
  138. #define FRCTSPERBATCH 256        /* filled rectangle batching */
  139. #endif
  140. #ifndef FARCSPERBATCH
  141. #define FARCSPERBATCH 256        /* filled arc batching */
  142. #endif
  143. #ifndef CURSORFONT
  144. #define CURSORFONT "cursor"        /* standard cursor fonts */
  145. #endif
  146.  
  147. /*
  148.  * display flags
  149.  */
  150. #define XlibDisplayIOError    (1L << 0)
  151. #define XlibDisplayClosing    (1L << 1)
  152.  
  153. /*
  154.  * X Protocol packetizing macros.
  155.  */
  156.  
  157. /*   Need to start requests on 64 bit word boundries
  158.  *   on a CRAY computer so add a NoOp (127) if needed.
  159.  *   A character pointer on a CRAY computer will be non-zero
  160.  *   after shifting right 61 bits of it is not pointing to
  161.  *   a word boundary.
  162.  */
  163. #ifdef WORD64
  164. #define WORD64ALIGN if ((long)dpy->bufptr >> 61) {\
  165.            dpy->last_req = dpy->bufptr;\
  166.            *(dpy->bufptr)   = X_NoOperation;\
  167.            *(dpy->bufptr+1) =  0;\
  168.            *(dpy->bufptr+2) =  0;\
  169.            *(dpy->bufptr+3) =  1;\
  170.              dpy->request += 1;\
  171.              dpy->bufptr += 4;\
  172.          }
  173. #else /* else does not require alignment on 64-bit boundaries */
  174. #define WORD64ALIGN
  175. #endif /* WORD64 */
  176.  
  177.  
  178. /*
  179.  * GetReq - Get the next avilable X request packet in the buffer and
  180.  * return it. 
  181.  *
  182.  * "name" is the name of the request, e.g. CreatePixmap, OpenFont, etc.
  183.  * "req" is the name of the request pointer.
  184.  *
  185.  */
  186.  
  187. #if __STDC__ && !defined(UNIXCPP)
  188. #define GetReq(name, req) \
  189.         WORD64ALIGN\
  190.     if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
  191.         _XFlush(dpy);\
  192.     req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
  193.     req->reqType = X_##name;\
  194.     req->length = (SIZEOF(x##name##Req))>>2;\
  195.     dpy->bufptr += SIZEOF(x##name##Req);\
  196.     dpy->request++
  197.  
  198. #else  /* non-ANSI C uses empty comment instead of "##" for token concatenation */
  199. #define GetReq(name, req) \
  200.         WORD64ALIGN\
  201.     if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
  202.         _XFlush(dpy);\
  203.     req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
  204.     req->reqType = X_/**/name;\
  205.     req->length = (SIZEOF(x/**/name/**/Req))>>2;\
  206.     dpy->bufptr += SIZEOF(x/**/name/**/Req);\
  207.     dpy->request++
  208. #endif
  209.  
  210. /* GetReqExtra is the same as GetReq, but allocates "n" additional
  211.    bytes after the request. "n" must be a multiple of 4!  */
  212.  
  213. #if __STDC__ && !defined(UNIXCPP)
  214. #define GetReqExtra(name, n, req) \
  215.         WORD64ALIGN\
  216.     if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\
  217.         _XFlush(dpy);\
  218.     req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\
  219.     req->reqType = X_##name;\
  220.     req->length = (SIZEOF(x##name##Req) + n)>>2;\
  221.     dpy->bufptr += SIZEOF(x##name##Req) + n;\
  222.     dpy->request++
  223. #else
  224. #define GetReqExtra(name, n, req) \
  225.         WORD64ALIGN\
  226.     if ((dpy->bufptr + SIZEOF(x/**/name/**/Req) + n) > dpy->bufmax)\
  227.         _XFlush(dpy);\
  228.     req = (x/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
  229.     req->reqType = X_/**/name;\
  230.     req->length = (SIZEOF(x/**/name/**/Req) + n)>>2;\
  231.     dpy->bufptr += SIZEOF(x/**/name/**/Req) + n;\
  232.     dpy->request++
  233. #endif
  234.  
  235.  
  236. /*
  237.  * GetResReq is for those requests that have a resource ID 
  238.  * (Window, Pixmap, GContext, etc.) as their single argument.
  239.  * "rid" is the name of the resource. 
  240.  */
  241.  
  242. #if __STDC__ && !defined(UNIXCPP)
  243. #define GetResReq(name, rid, req) \
  244.         WORD64ALIGN\
  245.     if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
  246.         _XFlush(dpy);\
  247.     req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
  248.     req->reqType = X_##name;\
  249.     req->length = 2;\
  250.     req->id = (rid);\
  251.     dpy->bufptr += SIZEOF(xResourceReq);\
  252.     dpy->request++
  253. #else
  254. #define GetResReq(name, rid, req) \
  255.         WORD64ALIGN\
  256.     if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
  257.         _XFlush(dpy);\
  258.     req = (xResourceReq *) (dpy->last_req = dpy->bufptr);\
  259.     req->reqType = X_/**/name;\
  260.     req->length = 2;\
  261.     req->id = (rid);\
  262.     dpy->bufptr += SIZEOF(xResourceReq);\
  263.     dpy->request++
  264. #endif
  265.  
  266. /*
  267.  * GetEmptyReq is for those requests that have no arguments
  268.  * at all. 
  269.  */
  270. #if __STDC__ && !defined(UNIXCPP)
  271. #define GetEmptyReq(name, req) \
  272.         WORD64ALIGN\
  273.     if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
  274.         _XFlush(dpy);\
  275.     req = (xReq *) (dpy->last_req = dpy->bufptr);\
  276.     req->reqType = X_##name;\
  277.     req->length = 1;\
  278.     dpy->bufptr += SIZEOF(xReq);\
  279.     dpy->request++
  280. #else
  281. #define GetEmptyReq(name, req) \
  282.         WORD64ALIGN\
  283.     if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
  284.         _XFlush(dpy);\
  285.     req = (xReq *) (dpy->last_req = dpy->bufptr);\
  286.     req->reqType = X_/**/name;\
  287.     req->length = 1;\
  288.     dpy->bufptr += SIZEOF(xReq);\
  289.     dpy->request++
  290. #endif
  291.  
  292.  
  293. #define SyncHandle() \
  294.     if (dpy->synchandler) (*dpy->synchandler)(dpy)
  295.  
  296. #define FlushGC(dpy, gc) \
  297.     if ((gc)->dirty) _XFlushGCCache((dpy), (gc))
  298. /*
  299.  * Data - Place data in the buffer and pad the end to provide
  300.  * 32 bit word alignment.  Transmit if the buffer fills.
  301.  *
  302.  * "dpy" is a pointer to a Display.
  303.  * "data" is a pinter to a data buffer.
  304.  * "len" is the length of the data buffer.
  305.  * we can presume buffer less than 2^16 bytes, so bcopy can be used safely.
  306.  */
  307. #ifndef DataRoutineIsProcedure
  308. #define Data(dpy, data, len) \
  309.     if (dpy->bufptr + (len) <= dpy->bufmax) {\
  310.         bcopy(data, dpy->bufptr, (int)len);\
  311.         dpy->bufptr += ((len) + 3) & ~3;\
  312.     } else\
  313.         _XSend(dpy, data, len)
  314. #endif /* DataRoutineIsProcedure */
  315.  
  316.  
  317. /* Allocate bytes from the buffer.  No padding is done, so if
  318.  * the length is not a multiple of 4, the caller must be
  319.  * careful to leave the buffer aligned after sending the
  320.  * current request.
  321.  *
  322.  * "type" is the type of the pointer being assigned to.
  323.  * "ptr" is the pointer being assigned to.
  324.  * "n" is the number of bytes to allocate.
  325.  *
  326.  * Example: 
  327.  *    xTextElt *elt;
  328.  *    BufAlloc (xTextElt *, elt, nbytes)
  329.  */
  330.  
  331. #define BufAlloc(type, ptr, n) \
  332.     if (dpy->bufptr + (n) > dpy->bufmax) \
  333.         _XFlush (dpy); \
  334.     ptr = (type) dpy->bufptr; \
  335.     dpy->bufptr += (n);
  336.  
  337. /*
  338.  * provide emulation routines for smaller architectures
  339.  */
  340. #ifndef WORD64
  341. #define Data16(dpy, data, len) Data((dpy), (char *)(data), (len))
  342. #define Data32(dpy, data, len) Data((dpy), (char *)(data), (len))
  343. #define _XRead16Pad(dpy, data, len) _XReadPad((dpy), (char *)(data), (len))
  344. #define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
  345. #define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
  346. #endif /* not WORD64 */
  347.  
  348. #define PackData16(dpy,data,len) Data16 (dpy, data, len)
  349. #define PackData32(dpy,data,len) Data32 (dpy, data, len)
  350.  
  351. /* Xlib manual is bogus */
  352. #define PackData(dpy,data,len) PackData16 (dpy, data, len)
  353.  
  354. #ifndef AMIGA
  355. #define min(a,b) (((a) < (b)) ? (a) : (b))
  356. #define max(a,b) (((a) > (b)) ? (a) : (b))
  357. #else
  358. #include <math.h>
  359. #endif /* AMIGA */
  360.  
  361. #define CI_NONEXISTCHAR(cs) (((cs)->width == 0) && \
  362.                  (((cs)->rbearing|(cs)->lbearing| \
  363.                    (cs)->ascent|(cs)->descent) == 0))
  364.  
  365. /* 
  366.  * CI_GET_CHAR_INFO_1D - return the charinfo struct for the indicated 8bit
  367.  * character.  If the character is in the column and exists, then return the
  368.  * appropriate metrics (note that fonts with common per-character metrics will
  369.  * return min_bounds).  If none of these hold true, try again with the default
  370.  * char.
  371.  */
  372. #define CI_GET_CHAR_INFO_1D(fs,col,def,cs) \
  373. { \
  374.     cs = def; \
  375.     if (col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
  376.     if (fs->per_char == NULL) { \
  377.         cs = &fs->min_bounds; \
  378.     } else { \
  379.         cs = &fs->per_char[(col - fs->min_char_or_byte2)]; \
  380.         if (CI_NONEXISTCHAR(cs)) cs = def; \
  381.     } \
  382.     } \
  383. }
  384.  
  385. #define CI_GET_DEFAULT_INFO_1D(fs,cs) \
  386.   CI_GET_CHAR_INFO_1D (fs, fs->default_char, NULL, cs)
  387.  
  388.  
  389.  
  390. /*
  391.  * CI_GET_CHAR_INFO_2D - return the charinfo struct for the indicated row and 
  392.  * column.  This is used for fonts that have more than row zero.
  393.  */
  394. #define CI_GET_CHAR_INFO_2D(fs,row,col,def,cs) \
  395. { \
  396.     cs = def; \
  397.     if (row >= fs->min_byte1 && row <= fs->max_byte1 && \
  398.     col >= fs->min_char_or_byte2 && col <= fs->max_char_or_byte2) { \
  399.     if (fs->per_char == NULL) { \
  400.         cs = &fs->min_bounds; \
  401.     } else { \
  402.         cs = &fs->per_char[((row - fs->min_byte1) * \
  403.                     (fs->max_char_or_byte2 - \
  404.                  fs->min_char_or_byte2 + 1)) + \
  405.                    (col - fs->min_char_or_byte2)]; \
  406.         if (CI_NONEXISTCHAR(cs)) cs = def; \
  407.         } \
  408.     } \
  409. }
  410.  
  411. #define CI_GET_DEFAULT_INFO_2D(fs,cs) \
  412. { \
  413.     unsigned int r = (fs->default_char >> 8); \
  414.     unsigned int c = (fs->default_char & 0xff); \
  415.     CI_GET_CHAR_INFO_2D (fs, r, c, NULL, cs); \
  416. }
  417.  
  418.  
  419.  
  420.  
  421.  
  422. #ifdef MUSTCOPY
  423.  
  424. /* a little bit of magic */
  425. #define OneDataCard32(dpy,dstaddr,srcvar) \
  426.   { dpy->bufptr -= 4; Data32 (dpy, (char *) &(srcvar), 4); }
  427.  
  428. #define STARTITERATE(tpvar,type,start,endcond,decr) \
  429.   { register char *cpvar; \
  430.   for (cpvar = (char *) start; endcond; cpvar = NEXTPTR(cpvar,type), decr) { \
  431.     type dummy; bcopy (cpvar, (char *) &dummy, SIZEOF(type)); \
  432.     tpvar = (type *) cpvar;
  433. #define ENDITERATE }}
  434.  
  435. #else
  436.  
  437. /* srcvar must be a variable for large architecture version */
  438. #define OneDataCard32(dpy,dstaddr,srcvar) \
  439.   { *(unsigned long *)(dstaddr) = (srcvar); }
  440.  
  441. #define STARTITERATE(tpvar,type,start,endcond,decr) \
  442.   for (tpvar = (type *) start; endcond; tpvar++, decr) {
  443. #define ENDITERATE }
  444.  
  445. #endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
  446.  
  447. /*
  448.  * This structure is private to the library.
  449.  */
  450. typedef struct _XFreeFuncs {
  451.     void (*atoms)();        /* _XFreeAtomTable */
  452.     int (*modifiermap)();    /* XFreeModifierMap */
  453.     void (*key_bindings)();    /* _XFreeKeyBindings */
  454.     void (*context_db)();    /* _XFreeContextDB */
  455.     void (*defaultCCCs)();    /* _XcmsFreeDefaultCCCs */
  456.     void (*clientCmaps)();    /* _XcmsFreeClientCmaps */
  457.     void (*intensityMaps)();    /* _XcmsFreeIntensityMaps */
  458.     void (*im_filters)();    /* _XFreeIMFilters */
  459. } _XFreeFuncRec;
  460.  
  461. /*
  462.  * This structure is private to the library.
  463.  */
  464. typedef struct _XExten {    /* private to extension mechanism */
  465.     struct _XExten *next;    /* next in list */
  466.     XExtCodes codes;    /* public information, all extension told */
  467.     int (*create_GC)();    /* routine to call when GC created */
  468.     int (*copy_GC)();    /* routine to call when GC copied */
  469.     int (*flush_GC)();    /* routine to call when GC flushed */
  470.     int (*free_GC)();    /* routine to call when GC freed */
  471.     int (*create_Font)();    /* routine to call when Font created */
  472.     int (*free_Font)();    /* routine to call when Font freed */
  473.     int (*close_display)();    /* routine to call when connection closed */
  474.     int (*error)();        /* who to call when an error occurs */
  475.         char *(*error_string)();  /* routine to supply error string */
  476.     char *name;        /* name of this extension */
  477.     void (*error_values)(); /* routine to supply error values */
  478. } _XExtension;
  479.  
  480.  
  481. /* extension hooks */
  482.  
  483. _XFUNCPROTOBEGIN
  484.  
  485. #ifdef DataRoutineIsProcedure
  486. extern void Data();
  487. #endif
  488. extern int _XError();            /* prepare to upcall user handler */
  489. extern int _XIOError();            /* prepare to upcall user handler */
  490. extern int (*_XIOErrorFunction)();    /* X system error reporting routine. */
  491. extern int (*_XErrorFunction)();    /* X_Error event reporting routine. */
  492. extern void _XEatData();        /* swallow data from server */
  493. extern char *_XAllocScratch();        /* fast memory allocator */
  494. extern Visual *_XVIDtoVisual();        /* given visual id, find structure */
  495. extern unsigned long _XSetLastRequestRead();    /* update dpy->last_request_read */
  496. extern int _XGetHostname();        /* get name of this machine */
  497. extern Screen *_XScreenOfWindow ();    /* get Screen pointer for window */
  498.  
  499. extern int (*XESetCreateGC(
  500. #if NeedFunctionPrototypes
  501.     Display*        /* display */,
  502.     int            /* extension */,
  503.     int (*) (
  504. #if NeedNestedPrototypes
  505.           Display*            /* display */,
  506.           GC            /* gc */,
  507.           XExtCodes*        /* codes */
  508. #endif
  509.         )        /* proc */
  510. #endif
  511. ))(
  512. #if NeedNestedPrototypes
  513.     Display*, GC, XExtCodes*
  514. #endif
  515. );
  516.  
  517. extern int (*XESetCopyGC(
  518. #if NeedFunctionPrototypes
  519.     Display*        /* display */,
  520.     int            /* extension */,
  521.     int (*) (
  522. #if NeedNestedPrototypes
  523.           Display*            /* display */,
  524.               GC            /* gc */,
  525.               XExtCodes*        /* codes */
  526. #endif
  527.             )        /* proc */          
  528. #endif
  529. ))(
  530. #if NeedNestedPrototypes
  531.     Display*, GC, XExtCodes*
  532. #endif
  533. );
  534.  
  535. extern int (*XESetFlushGC(
  536. #if NeedFunctionPrototypes
  537.     Display*        /* display */,
  538.     int            /* extenstion */,
  539.     int (*) (
  540. #if NeedNestedPrototypes
  541.           Display*            /* display */,
  542.               GC            /* gc */,
  543.               XExtCodes*        /* codes */
  544. #endif
  545.             )        /* proc */         
  546. #endif
  547. ))(
  548. #if NeedNestedPrototypes
  549.     Display*, GC, XExtCodes*
  550. #endif
  551. );
  552.  
  553. extern int (*XESetFreeGC(
  554. #if NeedFunctionPrototypes
  555.     Display*        /* display */,
  556.     int            /* extension */,
  557.     int (*) (
  558. #if NeedNestedPrototypes
  559.           Display*            /* display */,
  560.               GC            /* gc */,
  561.               XExtCodes*        /* codes */
  562. #endif
  563.             )        /* proc */         
  564. #endif
  565. ))(
  566. #if NeedNestedPrototypes
  567.     Display*, GC, XExtCodes*
  568. #endif
  569. );
  570.  
  571. extern int (*XESetCreateFont(
  572. #if NeedFunctionPrototypes
  573.     Display*        /* display */,
  574.     int            /* extension */,
  575.     int (*) (
  576. #if NeedNestedPrototypes
  577.           Display*            /* display */,
  578.               XFontStruct*        /* fs */,
  579.               XExtCodes*        /* codes */
  580. #endif
  581.             )        /* proc */    
  582. #endif
  583. ))(
  584. #if NeedNestedPrototypes
  585.     Display*, XFontStruct*, XExtCodes*
  586. #endif
  587. );
  588.  
  589. extern int (*XESetFreeFont(
  590. #if NeedFunctionPrototypes
  591.     Display*        /* display */,
  592.     int            /* extension */,
  593.     int (*) (
  594. #if NeedNestedPrototypes
  595.           Display*            /* display */,
  596.               XFontStruct*        /* fs */,
  597.               XExtCodes*        /* codes */
  598. #endif
  599.             )        /* proc */    
  600. #endif
  601. ))(
  602. #if NeedNestedPrototypes
  603.     Display*, XFontStruct*, XExtCodes*
  604. #endif
  605. ); 
  606.  
  607. extern int (*XESetCloseDisplay(
  608. #if NeedFunctionPrototypes
  609.     Display*        /* display */,
  610.     int            /* extension */,
  611.     int (*) (
  612. #if NeedNestedPrototypes
  613.           Display*            /* display */,
  614.               XExtCodes*        /* codes */
  615. #endif
  616.             )        /* proc */    
  617. #endif
  618. ))(
  619. #if NeedNestedPrototypes
  620.     Display*, XExtCodes*
  621. #endif
  622. );
  623.  
  624. extern int (*XESetError(
  625. #if NeedFunctionPrototypes
  626.     Display*        /* display */,
  627.     int            /* extension */,
  628.     int (*) (
  629. #if NeedNestedPrototypes
  630.           Display*            /* display */,
  631.               xError*            /* err */,
  632.               XExtCodes*        /* codes */,
  633.               int*            /* ret_code */
  634. #endif
  635.             )        /* proc */    
  636. #endif
  637. ))(
  638. #if NeedNestedPrototypes
  639.     Display*, xError*, XExtCodes*, int*
  640. #endif
  641. );
  642.  
  643. extern char* (*XESetErrorString(
  644. #if NeedFunctionPrototypes
  645.     Display*        /* display */,
  646.     int            /* extension */,
  647.     char* (*) (
  648. #if NeedNestedPrototypes
  649.             Display*        /* display */,
  650.                 int            /* code */,
  651.                 XExtCodes*        /* codes */,
  652.                 char*            /* buffer */,
  653.                 int            /* nbytes */
  654. #endif
  655.               )        /* proc */           
  656. #endif
  657. ))(
  658. #if NeedNestedPrototypes
  659.     Display*, int, XExtCodes*, char*, int
  660. #endif
  661. );
  662.  
  663. extern void (*XESetPrintErrorValues (
  664. #if NeedFunctionPrototypes
  665.     Display*        /* display */,
  666.     int            /* extension */,
  667.     void (*)(
  668. #if NeedNestedPrototypes
  669.           Display*            /* display */,
  670.           XErrorEvent*        /* ev */,
  671.           void*            /* fp */
  672. #endif
  673.          )        /* proc */
  674. #endif
  675. ))(
  676. #if NeedNestedPrototypes
  677.     Display*, XErrorEvent*, void*
  678. #endif
  679. );
  680.  
  681. extern int (*XESetWireToEvent(
  682. #if NeedFunctionPrototypes
  683.     Display*        /* display */,
  684.     int            /* event_number */,
  685.     Bool (*) (
  686. #if NeedNestedPrototypes
  687.            Display*            /* display */,
  688.                XEvent*            /* re */,
  689.                xEvent*            /* event */
  690. #endif
  691.              )        /* proc */    
  692. #endif
  693. ))(
  694. #if NeedNestedPrototypes
  695.     Display*, XEvent*, xEvent*
  696. #endif
  697. );
  698.  
  699. extern Status (*XESetEventToWire(
  700. #if NeedFunctionPrototypes
  701.     Display*        /* display */,
  702.     int            /* event_number */,
  703.     int (*) (
  704. #if NeedNestedPrototypes
  705.           Display*            /* display */,
  706.               XEvent*            /* re */,
  707.               xEvent*            /* event */
  708. #endif
  709.             )        /* proc */   
  710. #endif
  711. ))(
  712. #if NeedNestedPrototypes
  713.     Display*, XEvent*, xEvent*
  714. #endif
  715. );
  716.  
  717. extern Status (*XESetWireToError(
  718. #if NeedFunctionPrototypes
  719.     Display*        /* display */,
  720.     int            /* error_number */,
  721.     Bool (*) (
  722. #if NeedNestedPrototypes
  723.            Display*            /* display */,
  724.            XErrorEvent*        /* he */,
  725.            xError*            /* we */
  726. #endif
  727.             )        /* proc */   
  728. #endif
  729. ))(
  730. #if NeedNestedPrototypes
  731.     Display*, XErrorEvent*, xError*
  732. #endif
  733. );
  734.  
  735. _XFUNCPROTOEND
  736.